package _01_第一季._00_公共接口;

public interface Map<K,V> {
    int size();

    boolean isEmpty();

    void clear();

    //添加的同时将值返回
    V put(K key,V value);

    V get(K key);

    V remove(K key);

    boolean containsKey(K key);
    boolean containsValue(V value);

    void traversal(Visitor<K,V> visitor);

    public abstract class Visitor<K,V>{
        public boolean stop;

        public abstract boolean visit(K key,V value);
    }
}
